<h1>Listing news_items</h1>

<table>
  <tr>
    <th>Caption</th>
    <th>Text</th>
  </tr>

<% @news_items.each do |news_item| %>
  <tr>
    <td><%=h news_item.caption %></td>
    <td><%=h news_item.text %></td>
    <td><%= link_to 'Show', news_item %></td>
    <td><%= link_to 'Edit', edit_news_item_path(news_item) %></td>
    <td><%= link_to 'Destroy', news_item, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New news_item', new_news_item_path %>